from typing import Optional

from pydantic import BaseModel, EmailStr


class UserBase(BaseModel):
    email: EmailStr
    full_name: str


class UserCreateSchema(UserBase):
    email: EmailStr
    full_name: str
    password: str


class UserUpdateSchema(BaseModel):
    email: Optional[EmailStr] = None
    full_name: Optional[str] = None
    password: Optional[str] = None
    new_password: Optional[str] = None


class UserListViewSchema(UserBase):
    id: int
    disabled: bool


class UserSchema(UserListViewSchema):
    is_admin: bool
    is_director: bool
    is_hr_manager: bool
